<style scoped>
</style>

<template>
<div>


 <el-table
       :data="tableData"
       style="width: 100%">
       <el-table-column
         prop="user_id"
         label="日期"
         width="180">
       </el-table-column>
       <el-table-column
         prop="name"
         label="姓名"
         width="180">
       </el-table-column>
       <el-table-column
         prop="email"
         label="email">
       </el-table-column>
     </el-table>


</div>


</template>


<script>
    export default{
        props: [],
         data() {
              return {
                        tableData: [],

                      items: [],

              }
        },
        computed: {},
        components: {
                   'sl-user-list-item': require('./UserListGroupItem.vue'),
               },
        mounted(){
            console.log('Component Ready.');

            this.fetchData();

        },
        watch: {},
        events: {},
        methods: {
           onSubmit() {
                console.log('submit!');
                       },
            fetchData(){

                this.$api.get('/users/40', {
                    params: {
//
                    }
                })
                    .then((response => {
                        console.log(response);
                        this.tableData = response.data;
                    }).bind(this))
                    .catch((error => {
                        console.error(error);
                    }).bind(this));

            }
        },
    }
</script>